xen.git
20 years agoAdded comment.
emellor@leeni.uk.xensource.com [Wed, 26 Oct 2005 11:06:58 +0000 (12:06 +0100)]
Added comment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove second decleration of .PHONY & cleanup formating
jeroney@localhost.localdomain [Tue, 25 Oct 2005 16:37:00 +0000 (17:37 +0100)]
Remove second decleration of .PHONY & cleanup formating

20 years agoFix format spec for tracing.
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 15:00:49 +0000 (16:00 +0100)]
Fix format spec for tracing.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoNBD scripts, courtesy of Kurt Garloff:
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 10:52:56 +0000 (11:52 +0100)]
NBD scripts, courtesy of Kurt Garloff:

For domain migration, unless you use a rootless setup, you need
to have network storage available. For the poor people like me that
have no SAN, one easy possibility to have it is to use nbd.

Find attached the block-nbd script (in /etc/xen/scripts/) and
an example config file. The block-nbd script is based on the -enbd one.
They have been used successfully in the Xen Tutorial at Linux Kongress.

Signed-off-by: Kurt Garloff <garloff@suse.de>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 10:24:01 +0000 (11:24 +0100)]
Merged.

20 years agoMoved SuSE-specific getcfg call into a preiftransfer call. The semantics of
emellor@leeni.uk.xensource.com [Tue, 25 Oct 2005 10:22:47 +0000 (11:22 +0100)]
Moved SuSE-specific getcfg call into a preiftransfer call.  The semantics of
this aren't beautiful, but this gets the distro-specific code out of the body
of the network-bridge script and into a common place, while still preserving
the existing code behaviour.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDon't run network stop script when doing xend stop.
chris@ubuntu.eng.hq.xensource.com [Tue, 25 Oct 2005 02:04:30 +0000 (19:04 -0700)]
Don't run network stop script when doing xend stop.
It doesn't make sense to undo the network configuration when stopping
xend since that would cut off all VMs from the network.  Undoing the
network setup should be an option independent of xend stop.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoChange argument spec for introduce_domain argument parsing, as the MFN is a long.
emellor@leeni.uk.xensource.com [Mon, 24 Oct 2005 17:24:07 +0000 (18:24 +0100)]
Change argument spec for introduce_domain argument parsing, as the MFN is a long.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove recently added uses of errno, as these cause trouble on ia64 builds.
emellor@leeni.uk.xensource.com [Mon, 24 Oct 2005 17:21:38 +0000 (18:21 +0100)]
Remove recently added uses of errno, as these cause trouble on ia64 builds.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemoved some unnecessary imports.
emellor@leeni.uk.xensource.com [Mon, 24 Oct 2005 14:18:31 +0000 (15:18 +0100)]
Removed some unnecessary imports.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded a timestamp to the logging output by trace_io.
emellor@leeni.uk.xensource.com [Mon, 24 Oct 2005 13:12:42 +0000 (14:12 +0100)]
Added a timestamp to the logging output by trace_io.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDo not create the console tty until domain_create_ring has succeeded. This
emellor@leeni.uk.xensource.com [Mon, 24 Oct 2005 13:11:07 +0000 (14:11 +0100)]
Do not create the console tty until domain_create_ring has succeeded.  This
means that any reads attempted on that tty will not cause handle_tty_read to
segfault looking for an interface that does not exist.

Move the writing of the tty node so that it happens after console/limit has
been read, as it is cleaner if the writing is the last thing that happens.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agocompute the correct totalram_pages when the balloon increase or decrease the
vhanquez@kneesa.uk.xensource.com [Mon, 24 Oct 2005 11:57:37 +0000 (12:57 +0100)]
compute the correct totalram_pages when the balloon increase or decrease the
reservation. memory reports should be more correct now.

From: Satoshi Uchida <s-uchida@ap.jp.nec.com>
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoAttached patch avoids "Bad L1 flags 80" for VMX domains. Thanks Ian for
kaf24@firebug.cl.cam.ac.uk [Mon, 24 Oct 2005 07:04:38 +0000 (08:04 +0100)]
Attached patch avoids "Bad L1 flags 80" for VMX domains. Thanks Ian for
the suggestions.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoChange the semantics of GetDomainPath so that it always succeeds, regardless of
emellor@leeni.uk.xensource.com [Sun, 23 Oct 2005 21:45:15 +0000 (22:45 +0100)]
Change the semantics of GetDomainPath so that it always succeeds, regardless of
whether a domain has been introduced to the store.  Added a separate message
XS_IS_DOMAIN_INTRODUCED and API for that (xs_is_domain_introduced) to determine
whether the domain has really been introduced.  This change means that the
tools can determine the correct domain path earlier in the domain creation
process, which is particularly a factor with live migration, as it allows us
to create the devices earlier in the process, and unpause the new domain before
performing the introduce.  Until recently we already had these features, but
the simplification of the interface between xend and xenstored caused breakage.

No longer clear out the domain path when a domain is introduced -- this was a
hack to work around the recent problematic semantics of GetDomainPath.

Do not write the contents of the info block to the store.  All the configuration
info is written to the /vm path, and anything else in the info block is either
dealt with explicitly or is ephemeral and has no place in the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoInstead of writing errors to
emellor@leeni.uk.xensource.com [Sun, 23 Oct 2005 21:34:13 +0000 (22:34 +0100)]
Instead of writing errors to
/local/domain/0/backend/<devclass>/<dom>/<devid>/error, write them instead to
/local/domain/0/error/backend/<yada>.  This is not the best place for them
perhaps, but it moves them out of the backend directory, on which the drivers
have a watch.  This fixes the problem whereby writing an error will trigger a
watch, causing the error message to be written again, and repeat.  Fixes bug
#286.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoEnable TSC-offsetting capability to ensure that VMX
kaf24@firebug.cl.cam.ac.uk [Sun, 23 Oct 2005 15:54:51 +0000 (16:54 +0100)]
Enable TSC-offsetting capability to ensure that VMX
guest's TSC remains in sync with virtual-PIT interrupts.
This avoids the following message from full-virt Linux:
       "Losing too many ticks!
        TSC cannot be used as a timesource. =20
        Possible reasons for this are:
          You're running with Speedstep,
        ......"

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
20 years agoFix an issue for passing arguement from control panel to deivce model
kaf24@firebug.cl.cam.ac.uk [Sun, 23 Oct 2005 15:51:47 +0000 (16:51 +0100)]
Fix an  issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agosome fixes to VMX:
kaf24@firebug.cl.cam.ac.uk [Sun, 23 Oct 2005 10:51:15 +0000 (11:51 +0100)]
some fixes to VMX:
1) enable ACPI in VMXAssist by default.
2) do nothing when emulating wbinvd instruction in VMXAssist.
3) use MACRO in cpu number setting/getting code.
4) remove useless parameter flags from xc_vmx_build.
5) remove usage of dsi.v_start in xc_vmx_build when not handling
vmxloader elf.
6) unmap shared_page_va when destroy VMX domain.
7) change virtual_platform_def to vmx_platform.
8) remove useless code in vmx_setup_platform.
9) change parameter of vmx_setup_platform from vcpu to domain.
10) in xen HV, vmx domain get domain processor number from the reserved
E820 area.
11) in domain.c, don't define some functions when on i386 platform or no
CONFIG_VMX.
Also removed some ugly tailing space.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoReintroduce the changes made by changeset 7455:021324804fbd, which were
emellor@leeni.uk.xensource.com [Sat, 22 Oct 2005 10:04:45 +0000 (11:04 +0100)]
Reintroduce the changes made by changeset 7455:021324804fbd, which were
disabled by workaround 7468:17a9f111fa93.  We additionally need to set the
FD_CLOEXEC flag on the status fd given to SrvServer when spawning the network
script, as at least on some platforms this causes xend to fail to start
properly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix 'xm vcpu-list'. List cpumap as 'CPU Affinity'. Use
kaf24@firebug.cl.cam.ac.uk [Sat, 22 Oct 2005 09:33:26 +0000 (10:33 +0100)]
Fix 'xm vcpu-list'. List cpumap as 'CPU Affinity'. Use
special descriptive strings for empty and full cpu maps.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agocpumap cleanups -- Python now deals with lists of cpus
kaf24@firebug.cl.cam.ac.uk [Sat, 22 Oct 2005 07:35:03 +0000 (08:35 +0100)]
cpumap cleanups -- Python now deals with lists of cpus
rather than cpu bitmaps.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix assertions in bitops.c.
kaf24@firebug.cl.cam.ac.uk [Sat, 22 Oct 2005 06:43:56 +0000 (07:43 +0100)]
Fix assertions in bitops.c.

Signed-off-by: Aravindh Puthiyaparambil
<aravindh.puthiyaparambil@unisys.com>

20 years agoThis patch is to make xentop able to print vcpu usage for out of order
kaf24@firebug.cl.cam.ac.uk [Sat, 22 Oct 2005 06:37:15 +0000 (07:37 +0100)]
This patch is to make xentop able to print vcpu usage for out of order
enabled vcpus in a domain. This really isn't an issue anymore with the
changes made to dom0 ops and xm/xend.

But, I provide it because:

- Josh noticed my previous patch called getvcpuinfo twice for each vpcu,
which was completely silly.

- this patch would be useful in the remote chance that domain vpcus are
enabled out of order.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
20 years agoTwo patches were applied to pygrub's setup.py to work around python2.2
kaf24@firebug.cl.cam.ac.uk [Sat, 22 Oct 2005 06:35:36 +0000 (07:35 +0100)]
Two patches were applied to pygrub's setup.py to work around python2.2
limitations and only one is needed. Revert one of them.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
20 years agoDisable Xen verbosity by default. At this point I think it
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 19:07:54 +0000 (20:07 +0100)]
Disable Xen verbosity by default. At this point I think it
is best to disable 'scary' warning messages by default,
even though this will also quieten down genuine error
paths.

The ideal solution would be to introduce DPRINTK levels
(e.g., info, warning, error) and allow these to be selected
at compile and/or boot time. We could then enable error
messages until things have stabilised some more.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoTemporary workaround to xend start problem.
jrb44@plym.cl.cam.ac.uk [Fri, 21 Oct 2005 17:51:42 +0000 (18:51 +0100)]
Temporary workaround to xend start problem.

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoThis is a follow up of PIC device model by Xiaofeng and me to move to
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 17:29:26 +0000 (18:29 +0100)]
This is a follow up of PIC device model by Xiaofeng and me to move to
hypervisor using virtual weired interrupt line.  With this patch the
performance of CPU2K improves 7%, kernel kuild improves 14% and
cyclesoak improves 12%. It is quite amazing!

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
20 years agoTweak to pygrub build config detection.
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 17:19:38 +0000 (18:19 +0100)]
Tweak to pygrub build config detection.
Signed-off-by: Jeremy Katz <katzj@redhat.com>
20 years agoFix allocation of phys_to_machine_mapping array during
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 15:22:09 +0000 (16:22 +0100)]
Fix allocation of phys_to_machine_mapping array during
x86/64 linux boot. The original builder-provided array
must be made read-only in the initial mapping.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd biossums dependency to Makefile to avoid parallel build breakage.
jrb44@plym.cl.cam.ac.uk [Fri, 21 Oct 2005 14:42:26 +0000 (15:42 +0100)]
Add biossums dependency to Makefile to avoid parallel build breakage.

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 14:34:17 +0000 (15:34 +0100)]
Merged.

20 years agoExplicitly delete xc instance, which will hopefully solve the intermittent
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 14:31:51 +0000 (15:31 +0100)]
Explicitly delete xc instance, which will hopefully solve the intermittent
failure to start up.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix early bootstrap of secondary VCPUs on x86/64.
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 13:33:46 +0000 (14:33 +0100)]
Fix early bootstrap of secondary VCPUs on x86/64.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoBreak proc paths out into separate include file, rather than inlining them.
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 12:30:31 +0000 (13:30 +0100)]
Break proc paths out into separate include file, rather than inlining them.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 11:07:14 +0000 (12:07 +0100)]
Merged.

20 years agoBreak common network code in xen-network-common.sh, and common vif hotplugging
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 11:06:17 +0000 (12:06 +0100)]
Break common network code in xen-network-common.sh, and common vif hotplugging
code into vif-common.sh.

Fix the antispoofing in network-bridge to allow forwarding from physical
device to bridge, and vif0.0 to eth0.

Change the interface between netback driver and vif hotplugging scripts.  The
mac address and bridge details are read from the store directly by the script,
so that the kernel driver does not need to get involved.

Remove an awful lot of cruft from vif-bridge.  Move the iptables handling into
vif-common.sh, and fix it so that the new vif can get past the antispoofing
entries.  Merge vif-nat and vif-route into this structure too.

Use ip instead of ifconfig to get necessary details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoTidy xend-config.sxp, removing entries that haven't been used since the
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 11:04:30 +0000 (12:04 +0100)]
Tidy xend-config.sxp, removing entries that haven't been used since the
hotplugging stuff was introduced (block-*, console-port-base, console-address)
and introducing entries for options that have been present for ages
(xend-{http,unix,relocation}-server, xend-unix-path, xend-relocation-address,
enable-dump).  Remove vif-antispoof, as Vifctl no longer passes this option
down.

Made the xend-relocation-server default to no, as this is a potential security
hole and so must be turned on explicitly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoWork around internal error in some versions of x86/64 gcc
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 10:29:51 +0000 (11:29 +0100)]
Work around internal error in some versions of x86/64 gcc
by manually hoisting gdt address calculation outside loop.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemoved xen.util.process, as no-one is using it, and it leaves defunct processes
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 10:22:48 +0000 (11:22 +0100)]
Removed xen.util.process, as no-one is using it, and it leaves defunct processes
behind.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove unused Vifctl.vifctl and Vifctl.set_vif_name. Remove the bridge and
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 10:21:05 +0000 (11:21 +0100)]
Remove unused Vifctl.vifctl and Vifctl.set_vif_name.  Remove the bridge and
antispoof parameters from Vifctl.network -- these are already handled by the
script, so it is redundant to have a separate override for these parameters
coming from outside.  Don't use xen.util.process.runscript, because we don't
need to return the output, and therefore can just use os.spawnl.

Remove XendRoot.get_vif_antispoof, matching change above.

Prefix XendRoot.network_script_dir onto the return value for
XendRoot.get_network_script(), removing that burden from callers.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoOutput the Xen changeset in the logs at start of day.
emellor@leeni.uk.xensource.com [Fri, 21 Oct 2005 10:08:48 +0000 (11:08 +0100)]
Output the Xen changeset in the logs at start of day.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUpgrade tree to 2.6.12.6.
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 09:46:30 +0000 (10:46 +0100)]
Upgrade tree to 2.6.12.6.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoUpdate one file from qemu 0.71 for Cirrus Logic VGA device model.
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 09:24:35 +0000 (10:24 +0100)]
Update one file from qemu 0.71 for Cirrus Logic VGA device model.
Using the older device model running pinball game on windows with
full screen can cause guest crash.

Signed-off-by: yunhong.jiang@intel.com
20 years agoSend special keys that your graphical user interface intercepts at
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 09:20:38 +0000 (10:20 +0100)]
Send special keys that your graphical user interface intercepts at
low level, such as ctrl-alt-del in X Window.

Adds a command "sendkey" to deal with it in the monitor, you
can send keys to the vm. Use - to press several keys simultaneously.
Example:
sendkey ctrl-alt-f1

Signed-off-by: Dan Xu <dan.d.xu@intel.com>
Signed-off-by: Zhai, Edwin <edwin.zhai@intel.com>
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agoTurn off some debug switches by default
kaf24@firebug.cl.cam.ac.uk [Fri, 21 Oct 2005 09:17:29 +0000 (10:17 +0100)]
Turn off some debug switches by default
These macros cause extra prints in /var/log/xend-debug, and
affect the performance.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agoThis patch to the Xen access control module (ACM) and tools:
kaf24@firebug.cl.cam.ac.uk [Thu, 20 Oct 2005 20:37:15 +0000 (21:37 +0100)]
This patch to the Xen access control module (ACM) and tools:

  1. adapts ACM hooks to the slightly changed event channel structure
  2. introduces an ACM_GETDECISION command, which enables authorized
domains to retrieve policy decisions regarding the sharing of resources
(STE policy) from the Xen hypervisor
  3. includes cleanup (warnings I found when applying  analysis tools such
as beam or flawfinder to the ACM code)

 The get_decision function is useful to enforce:
   *  the security policy on network traffic  in the network backends in
domain 0; currently there is no enforcement in Dom0 and all packets flow
freely
   *  the security policy in block device backends to control which
domains can access which vdisk resources

I have added a small test program that shows how to use the get_decision
ACM interface call, it is in tools/security/get_decision.c and will be
compiled together with the policy tools. As usual, the ACM is unconfigured
until you switch on a security policy on in Config.mk.

Signed-off: Reiner Sailer <sailer@us.ibm.com>

20 years agoAvoid specifying bogus DISPLAY=None when spawning device model.
jrb44@plym.cl.cam.ac.uk [Thu, 20 Oct 2005 18:37:41 +0000 (19:37 +0100)]
Avoid specifying bogus DISPLAY=None when spawning device model.

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoSet antispoof default to yes, as this seems safer, and is the current behaviour
emellor@leeni.uk.xensource.com [Thu, 20 Oct 2005 13:06:07 +0000 (14:06 +0100)]
Set antispoof default to yes, as this seems safer, and is the current behaviour
in VifCtl.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 20 Oct 2005 11:35:57 +0000 (12:35 +0100)]
Merged.

20 years agoFix the recently-introduced failure to preserve uuid across a guest reboot.
emellor@leeni.uk.xensource.com [Thu, 20 Oct 2005 11:34:50 +0000 (12:34 +0100)]
Fix the recently-introduced failure to preserve uuid across a guest reboot.
Store the uuid in string form inside XendDomainInfo, to aid this.

Add restart-squelching logic to ensure that runaway domains to restart
indefinitely.  The logic here could be cleverer, say including a backoff for
retrying, in case a network block device has gone away, but for now this will
do to stop the pathological behaviour.  Fixes bug #275.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoNew function direct_kernel_remap_pfn_range(). Like
kaf24@firebug.cl.cam.ac.uk [Thu, 20 Oct 2005 11:10:14 +0000 (12:10 +0100)]
New function direct_kernel_remap_pfn_range(). Like
direct_remap_pfn_range but doesn't take a vma and implicitly
maps into init_mm.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agodisable bogus touchpad device model, which cause annoying dmesg on 2.6 kernel
kaf24@firebug.cl.cam.ac.uk [Thu, 20 Oct 2005 10:52:27 +0000 (11:52 +0100)]
disable bogus touchpad device model, which cause annoying dmesg on 2.6 kernel
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
20 years agosmp_call_function() must be usable as an expression
kaf24@firebug.cl.cam.ac.uk [Thu, 20 Oct 2005 10:27:51 +0000 (11:27 +0100)]
smp_call_function() must be usable as an expression
return an integer.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix NMI race with context switch.
kaf24@firebug.cl.cam.ac.uk [Thu, 20 Oct 2005 10:25:55 +0000 (11:25 +0100)]
Fix NMI race with context switch.

The machine used to auto reboot if an NMI was received in a critical
time window when context switching domains. There is a small time
window when the GDT may become unmapped (after CR3 is updated and
before setting GDTR with the new GDT during a domain context
switch. If an NMI is received during this time window a triple fault
is triggered causing the machine to auto reboot.

Bug found and original patch proposed by Jose Renato Santos
<jsantos@hpl.hp.com>.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMakes smp_call_function a real stmt if CONFIG_SMP is not defined.
tristan.gingold@bull.net [Thu, 20 Oct 2005 10:01:11 +0000 (06:01 -0400)]
Makes smp_call_function a real stmt if CONFIG_SMP is not defined.
This avoid a GCC warning.

20 years agoThis patch fixes the problem that VMX guest can not get brought up on
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 17:18:30 +0000 (18:18 +0100)]
This patch fixes the problem that VMX guest can not get brought up on
current tip (changeset 7425).

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 15:25:39 +0000 (16:25 +0100)]
Merged.

20 years agoNew network-bridge script and associated gubbins.
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 15:24:54 +0000 (16:24 +0100)]
New network-bridge script and associated gubbins.

This is Kurt Garloff's reworked network-bridge script:

* we got rid of ifconfig
* it works for netdev != eth0
* arp on and off are symmetric as are ifdown and ifup
* ifup will be passed the ifcfg config file name if needed
  (the ifup may otherwise figure that the veth0 hardware is
   NOT the same as the original ${netdev} and not use the same
   config -- this happens on SUSE. Charles Coffing tracked this
   one down.)

Plus Kurt's avoid-dash patch:

the network setup scripts on SUSE have trouble with the bridge
name xen-br0; they don't expect the '-'.
Arguably this should be fixed.
But I assume there's more scripts out there which may not like it,
so I suggest the following patch to rename xen-br0 to xenbr0.

Plus Charles Duffy's patch to support multiple bridges:

The attached patch allows the network-bridge script to be used to
generate multiple bridges corresponding to different physical
interfaces. It adds a new parameter, "vifnum", used to refer both to
the loopback interface to be used and to set defaults regarding the
physical interface and bridge name.

Thus, if one wishes to start xenbr0 on eth0 and xenbr1 on eth1, one
need only call:

network-bridge start ## vifnum is 0 by default
network-bridge start vifnum=1

...well, that and set loopback.nloopbacks=2 in the Dom0 kernel
parameters.

Plus renaming of virtnum to vifnum in Charles' patch, as requested by Ian Pratt.

Plus a fix to DevController to allocate vif IDs starting from 0 (i.e. vif2.0
is now domain 2's first vif, as opposed to vif2.1 in the recent past).

Plus tidying up inside network-bridge using some helper variables.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agopygrub's setup.py relies on distutils.UnixCCompiler.has_function(),
kaf24@firebug.cl.cam.ac.uk [Wed, 19 Oct 2005 15:07:11 +0000 (16:07 +0100)]
pygrub's setup.py relies on distutils.UnixCCompiler.has_function(),
which does not exist with python2.2, causing the following build
error:

make[2]: Entering directory `/home/muli/xen/x86.hg/tools/pygrub'
CFLAGS=" -m32 -march=i686" python setup.py build
Traceback (most recent call last):
  File "setup.py", line 15, in ?
    if cc.has_function("ext2fs_open2"):
AttributeError: UnixCCompiler instance has no attribute 'has_function'

The following patch gets it to build, but is pretty ugly. A proper fix
would be to do the check for ext2fs_open2() in a way that is backward
compatible with python2.2.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
20 years agoDeclare ac_timer_init() properly in ac_timer.h
kaf24@firebug.cl.cam.ac.uk [Wed, 19 Oct 2005 14:51:14 +0000 (15:51 +0100)]
Declare ac_timer_init() properly in ac_timer.h

20 years agoMerge.
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 13:00:37 +0000 (14:00 +0100)]
Merge.

20 years agoAdded diagnosis tool for broken domains.
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 12:59:22 +0000 (13:59 +0100)]
Added diagnosis tool for broken domains.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdd slack to balloon driver to allow to counteract low-mem
kaf24@firebug.cl.cam.ac.uk [Wed, 19 Oct 2005 12:59:15 +0000 (13:59 +0100)]
Add slack to balloon driver to allow to counteract low-mem
address space allocations in backend drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Wed, 19 Oct 2005 12:42:55 +0000 (13:42 +0100)]
merge

20 years agoBetter fix to detect failed patch application when building
kaf24@firebug.cl.cam.ac.uk [Wed, 19 Oct 2005 12:39:59 +0000 (13:39 +0100)]
Better fix to detect failed patch application when building
guest kernels.
Signed-off-by: Muli Ben-Yehuda <mulix@mulix.org>
20 years agoSet the console limit for DomUs based on a value set in xend-config.sxp.
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 12:37:16 +0000 (13:37 +0100)]
Set the console limit for DomUs based on a value set in xend-config.sxp.

Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoSome trivial changes for the tool scripts:
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 12:34:44 +0000 (13:34 +0100)]
Some trivial changes for the tool scripts:
 - make xen-hotplug-common.sh (un)set locales.
 - use xen-hotplug-common.sh in vif-bridge.

From Gerd Knorr <kraxel@suse.de>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded sedf_get functionality to XendClient interface. From David Isaac
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 12:33:22 +0000 (13:33 +0100)]
Added sedf_get functionality to XendClient interface.  From David Isaac
Wolinsky <davidiw@ufl.edu>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove unused parameter from addControllerClass. This became unused when the
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 10:53:00 +0000 (11:53 +0100)]
Remove unused parameter from addControllerClass.  This became unused when the
BE_DOMAIN flags were removed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove unused shadow_control functionality from the Python layer. This is
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 10:51:25 +0000 (11:51 +0100)]
Remove unused shadow_control functionality from the Python layer.  This is
handled in xc_linux_save, and no-one in the Python layer uses this functionality
directly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoTake advantage of the new UUID (handle) stored for us in Xen to improve the
emellor@leeni.uk.xensource.com [Wed, 19 Oct 2005 10:47:51 +0000 (11:47 +0100)]
Take advantage of the new UUID (handle) stored for us in Xen to improve the
recreation semantics.

Remove the unpause at the end of xc_linux_restore, and move it to
XendDomainInfo.  This is necessary because xenstored now allocates the domain
path when the domain is introduced, which means that the new domain cannot
start running until that introduce is performed and the new devices
configured.

Give restore a separate completion phase in which domain details are stored.
This is required because the domain path is no longer available until after
the introduceDomain call.

TODO: Split the domain introduction into two so that the domain path is
available earlier.  At the moment, the domain <-> store channel details are
passed in to xenstored when the domain is introduced, but in the case of
restore it is necessary to wait until the restore is completed before the
channel MFN is available.

Change the interface between XendDomainInfo and XendCheckpoint/image to not
have hideous callbacks through setConsoleRef and setStoreRef.  Instead,
image.createImage explicitly returns those values, and XendCheckpoint passes
them through to completeRestore.

Move the purging of the domain path corresponding to a new domain from Xend
to xenstored, since xenstored is now in charge of this path.  With the domain
path creation moved to xenstored, Xend cannot remove the path, because watches
may have fired on it already.

Fix the printf statement in xenstored in verbose mode that details the
messages being written.  This statement was printing the buffer using %s, but
this buffer has an explicit length field, so we were seeing garbage after the
correct details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRename 2.6.12.5 patch so it actually gets applied. Fail
kaf24@firebug.cl.cam.ac.uk [Wed, 19 Oct 2005 06:43:03 +0000 (07:43 +0100)]
Rename 2.6.12.5 patch so it actually gets applied. Fail
the build if 'patch' is missing.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix -xen builds.
kaf24@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 18:28:16 +0000 (19:28 +0100)]
Fix -xen builds.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoDomain0 doesn't do initial VCPU hotplug via xenstore.
kaf24@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 18:07:03 +0000 (19:07 +0100)]
Domain0 doesn't do initial VCPU hotplug via xenstore.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove 'n_vcpu' field from start_info structure. Domain0
kaf24@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 18:02:14 +0000 (19:02 +0100)]
Remove 'n_vcpu' field from start_info structure. Domain0
simply creates a CPU on every physical CPU. Other domains
read the initial VCPU configuration from xenstore.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoProtect __del__ from failure inside __init__ by setting inTransaction before
emellor@leeni.uk.xensource.com [Tue, 18 Oct 2005 17:07:11 +0000 (18:07 +0100)]
Protect __del__ from failure inside __init__ by setting inTransaction before
trying to create a transaction instance.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded uuid unit test.
emellor@leeni.uk.xensource.com [Tue, 18 Oct 2005 17:01:14 +0000 (18:01 +0100)]
Added uuid unit test.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix call to getVCpuCount for dom0.
emellor@leeni.uk.xensource.com [Tue, 18 Oct 2005 16:45:50 +0000 (17:45 +0100)]
Fix call to getVCpuCount for dom0.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerge i386/x86_64 smpboot.c into a simplified common Xen version.
kaf24@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 16:40:31 +0000 (17:40 +0100)]
Merge i386/x86_64 smpboot.c into a simplified common Xen version.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoalloc_netif() must return a ERR_PTR() on error, not NULL.
kaf24@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 14:40:29 +0000 (15:40 +0100)]
alloc_netif() must return a ERR_PTR() on error, not NULL.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up some VMX IO handler code:
kaf24@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 10:09:36 +0000 (11:09 +0100)]
Clean up some VMX IO handler code:
1. Clean up some definitions.
2. change d to v, if it means vcpu.
3. remove some tailing spaces.

TODO:
split current VMX IO handler list to 2, one for port IO,
and the other for MMIO.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoFix x86_64 smp boot:
kaf24@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 10:07:55 +0000 (11:07 +0100)]
Fix x86_64 smp boot:
    The local_setup_timer prototype was bad. The call from start
secondary() to it was calling with out the CPU parameter. Eventually the
CPU parameter received by the local_setup_timer is bogus (big negative
number). With such a big cpu number the per_cpu macro was trying to
access totally wrong memory location (per cpu data offset for big -ve no
cpu) causing the unhandled page fault. Because the dom0 was panicking
the error information on the serial console was also not going through,
giving just clueless hang.  With hyper call based debug statement I
could find out what was going wrong in the dom0.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
20 years agoAllow interdomain channels to bind DOMID_SELF to DOMID_SELF.
kaf24@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 10:04:48 +0000 (11:04 +0100)]
Allow interdomain channels to bind DOMID_SELF to DOMID_SELF.
Signed-off-by: Steve King <steven.r.king@intel.com>
20 years agoThere are only six fields in vcpuinfo.
kaf24@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 09:53:30 +0000 (10:53 +0100)]
There are only six fields in vcpuinfo.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
20 years agoIn the shadow mode, thanks to recent patches, the shadow
kaf24@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 09:45:29 +0000 (10:45 +0100)]
In the shadow mode, thanks to recent patches, the shadow
reference counts (both general counts and type counts)
are now correct in all of my testing so far.  As a result,
we should remove the shadow_tainted_refcnt flag from
the domain structure.  Leaving this flag in place would
create confusion for programmers and would also prevent
future debugging of problems in handling general and type
reference counts in the shadow mode.  In addition, the
patch also (1) drops the requirement that shadow_mode_disable()
should only be called in the domain destruction sequence
(even though it is only used that way so far), and
(2) strictly assert that the type reference count must
be 0 when we free a page from the dom heap.

Signed-off-by: Khoa Huynh <khoa@us.ibm.com>
20 years agoFix transaction EAGAIN handling in xenstore client programs.
cl349@firebug.cl.cam.ac.uk [Tue, 18 Oct 2005 01:08:26 +0000 (02:08 +0100)]
Fix transaction EAGAIN handling in xenstore client programs.
Redirect all output to a buffer and only print the buffer once the
transaction succeeds, discarding output from previous attempts.
In particular, fixes failures when the (block) backend driver would
not configure because reads from the hotplug script did get double
output when a transaction had to be redone.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoPut back the arg_check calls removed recently -- they aren't as useless as I
emellor@leeni.uk.xensource.com [Mon, 17 Oct 2005 19:34:10 +0000 (20:34 +0100)]
Put back the arg_check calls removed recently -- they aren't as useless as I
thought they were.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMore removal of BE_DOMAIN flags.
emellor@leeni.uk.xensource.com [Mon, 17 Oct 2005 15:33:27 +0000 (16:33 +0100)]
More removal of BE_DOMAIN flags.

20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 17 Oct 2005 15:23:26 +0000 (16:23 +0100)]
Merged.

20 years agoHave xenstored initialise its connections, meaning that xend can be out of
emellor@leeni.uk.xensource.com [Mon, 17 Oct 2005 15:22:05 +0000 (16:22 +0100)]
Have xenstored initialise its connections, meaning that xend can be out of
that loop completely -- the xc_init_store, initDomainStore calls can all go.

Have xenstored understand where the local domain information goes.  Xend no
longer has to generate a path and pass it to xenstored through
xs_introduce_domain -- we just allow xenstored to generate the path, and then
call GetDomainPath later.  There is still some work required to tidy this up.

Change the uuid module to generate uuids as lists of bytes, not in the
stringified form.  Added a unit test for that module.

Change the semantics of Xend restart, relying on these changes to the
xenstored semantics and earlier changes to add an opaque handle to the
hypervisor's domain-specific data block.  The semantics are now clearer, as
Xend can validate whether the details in the store match the current live
domain.

Added a usage statement to xenstored.

Some of this code is by Steven Hand.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove useless SIF_XXX_BE_DOMAIN driver flags.
kaf24@firebug.cl.cam.ac.uk [Mon, 17 Oct 2005 14:54:28 +0000 (15:54 +0100)]
Remove useless SIF_XXX_BE_DOMAIN driver flags.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMake the event-channel pending and mask arrays consist of
kaf24@firebug.cl.cam.ac.uk [Mon, 17 Oct 2005 14:15:17 +0000 (15:15 +0100)]
Make the event-channel pending and mask arrays consist of
longs. Thi sensures appropriate alignment for architectures
that require it, and also allows us to naturally support up
to 4096 event channels per 64-bit guest.

Moved 'n_vcpu' field from shared_info to start_info. Really it
ought to disappear altogether as the info can be derived from
xenstore.

Fix a weird bug in XendDomainInfo where 'vcpus' information for
a domain defaults to floating point value 1.0 rather than integer
1. This looks like a Python bug to me, but in any case it is
'fixed' by explicitly converting the default value to an integer.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 17 Oct 2005 13:12:20 +0000 (14:12 +0100)]
Merged.

20 years agoReplace xm vcpu-enable and xm vcpu-disable with one command, xm set-vcpus,
emellor@leeni.uk.xensource.com [Mon, 17 Oct 2005 13:07:47 +0000 (14:07 +0100)]
Replace xm vcpu-enable and xm vcpu-disable with one command, xm set-vcpus,
which sets the number of active CPUs.  Xend then toggles the VCPUs to ensure a
contiguous group of them are enabled.

Added a server command to get VCPU information, and use this info to fix
xm vcpu-list.  That xm command now has extra information, too.  CPU == -1 is no
longer used as an indicator for a VCPU that is disabled -- a separate state
field is available, and the CPU is set merely to '-'.  Individual CPU time is
now available.

Deprecated xm list -v.  -v is conventionally used for --verbose, so using it
to list vcpus is confusing.  Furthermore, we already have an equivalent command
xm vcpu-list.

Tidied up the horrendous xm list / xm vcpu-list code.

Removed the vcpus field from the dict returned by xc_domain_getinfo, and the
vcpu_to_cpu map from the sxpr returned for xm list.

Move the dom0_enforce_vcpus code into XendDomain.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoForce RTC driver to fail to load in domU by preventing it
kaf24@firebug.cl.cam.ac.uk [Mon, 17 Oct 2005 13:02:36 +0000 (14:02 +0100)]
Force RTC driver to fail to load in domU by preventing it
from binding to IRQ8.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdded a TRACE log level, for those versions of Python that do not have it, and
emellor@leeni.uk.xensource.com [Mon, 17 Oct 2005 12:50:28 +0000 (13:50 +0100)]
Added a TRACE log level, for those versions of Python that do not have it, and
moved XendDomainInfo.update's debugging onto that level, as it has become
overly verbose.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoPlumb GETVCPUINFO dom0_op through to Python. Remove
kaf24@firebug.cl.cam.ac.uk [Mon, 17 Oct 2005 10:36:36 +0000 (11:36 +0100)]
Plumb GETVCPUINFO dom0_op through to Python. Remove
n_vcpu field from GETDOMAININFO: replaced with
nr_online_vcpus and max_vcpu_id (both plumbed through to
Python).

TODO: Remove 'vcpus' entry in getdomaininfo Python
      dictionary.

TODO: Don't represent 'cpumap' as a bitmap in Python.
      It would be more sensible to represent as a list
      of integer CPU numbers.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up debug tracing in mm and mm audit code.
kaf24@firebug.cl.cam.ac.uk [Sun, 16 Oct 2005 16:25:15 +0000 (17:25 +0100)]
Clean up debug tracing in mm and mm audit code.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSmall cleanup in hotplug script.
kaf24@firebug.cl.cam.ac.uk [Sun, 16 Oct 2005 11:34:37 +0000 (12:34 +0100)]
Small cleanup in hotplug script.
Signed-off-by: Keir Fraser <keir@xensource.com>